GCP API を Terraform から有効にする
有効なもののリストは以下で確認できる
$ gcloud services list
code:services.tf
locals {
services = toset([
"cloudbuild.googleapis.com",
"cloudresourcemanager.googleapis.com",
"containerregistry.googleapis.com",
"iam.googleapis.com",
"iap.googleapis.com",
"run.googleapis.com",
])
}
resource "google_project_service" "service" {
for_each = local.services
project = var.project
service = each.value
}